import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:untitled/pages/view/home/mine_login_page.dart';
import 'package:untitled/pages/view/home/mine_no_loagin.dart';
import 'package:untitled/pages/view/home/userHepler.dart';


class MineMainPage extends StatefulWidget {
  
  const MineMainPage({Key? key}) : super(key: key);

  @override
  State<MineMainPage> createState() => _MineMainPageState();
}
// 个人中心页面
class _MineMainPageState extends State<MineMainPage> {
  @override
  Widget build(BuildContext context) {
   return AnnotatedRegion(
     child: buildMainBoyd(), 
     value: SystemUiOverlayStyle(
        statusBarBrightness: Brightness.light,
        statusBarColor: Color(0XFFCDDEEC),
     ));
    
  }

  buildMainBoyd(){
     // 是否登录
   if(UserHepler.getInstance.isLogin){
     // 构建已登录的页面
     return MineLoginPage();
   }else{
     // 构建未登录的页面
     return MineNoLoginPage();
   }
  }
}